#pragma once

PBBIMCOREMODEL_TYPEDEFS(%Class%)

BEGIN_PBBIM_COREMODEL_NAMESPACE
/*=================================================================================**//**
* @bsiclass                                     Y.Dong                        %CreateTime%
+===============+===============+===============+===============+===============+======*/

class %Class% : public %BaseClassName%
{
    DEFINE_T_SUPER(%BaseClassName%);

private:
    %VarsFunctionDeclare%

    PBBimCore::PBArchiStoreyCP m_storeyPtr;

    PBBimCore::PhysicalGeometryPtr CreatePhysicalGeometry3D(DgnProjectR project, PBBimCore::PBModelInfo const& modelInfo, bool isDynamics);
    PBBimCore::PhysicalGeometryPtr CreatePhysicalGeometryPlan(DgnProjectR project, PBBimCore::PBModelInfo const& modelInfo, bool isDynamics);

protected:

    PBBIMCOREMODEL_EXPORT virtual StatusInt    _CopyDataToInstance(BentleyApi::ECN::IECInstanceR instance, DgnProjectR project) const override;
    PBBIMCOREMODEL_EXPORT virtual StatusInt    _InitFromInstance(BentleyApi::ECN::IECInstanceCR instance) override;
    PBBIMCOREMODEL_EXPORT virtual void        _GetDescription(WStringR descr, ElementHandleCR eh) override{    descr = L"PBBim.Arch%Class%";};

    PBBIMCOREMODEL_EXPORT virtual PBBimCore::PBBimDomain _GetDomain() const override { return PBBimCore::PBBimDomain::Archi; }

    PBBIMCOREMODEL_EXPORT virtual PBBimCore::PhysicalGeometryPtr _CreatePhysicalGeometry(DgnProjectR project, PBBimCore::PBModelInfo const& modelInfo, bool isDynamics) override;
    PBBIMCOREMODEL_EXPORT virtual Utf8String   _GetSchemaName() const override{ return PBM_SCHEMA_ARCHIMODEL; };
    PBBIMCOREMODEL_EXPORT virtual Utf8String   _GetECClassName() const override{ return PBM_CLASS_ARCH_%schemaName%; };

    PBBIMCOREMODEL_EXPORT virtual T_PBBImSymbologyTable _GetSymbologys(DgnProjectR project) const override;

    //PBBIMCOREMODEL_EXPORT virtual StatusInt _OnPostInsertInstance(BentleyApi::ECN::IECInstanceCR instance, DgnProjectR project);

public:
    PBBIMCOREMODEL_EXPORT %Class%();
    PBBIMCOREMODEL_EXPORT %Class%(BentleyApi::ECN::IECInstanceCR instance);
    PBBIMCOREMODEL_EXPORT virtual ~%Class%();

    PBBIMCOREMODEL_EXPORT %Class%& operator= (const %Class%& val);
    //PBBIMCOREMODEL_EXPORT bool DeleteWithRelation(DgnProjectR project);
    //PBBIMCOREMODEL_EXPORT bool TramsformWithRelation(DgnProjectR project, TransformCR transform, T_ECInstanceKeyArray &relInsKeys);
    PBBIMCOREMODEL_EXPORT StatusInt DeepClone(DgnProjectR project, %Class%Ptr &new%Class%);

    %VarsFunctionGetSetInc%

    PBBIMCOREMODEL_EXPORT CString GetDescrib() const;
    PBBIMCOREMODEL_EXPORT void SetStorey(PBBimCore::PBArchiStoreyCR storey){ m_storeyPtr = &storey; }
    PBBIMCOREMODEL_EXPORT PBBimCore::PBArchiStoreyCP GetStorey() const { return m_storeyPtr; }
    PBBIMCOREMODEL_EXPORT void GetVolumnAreaLength(double& length, double& vol, double& area);

    PBBIMCOREMODEL_CREATE(%Class%);
};

PBBIMCOREMODEL_EXTENSION(%Class%);

END_PBBIM_COREMODEL_NAMESPACE
